﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VTemplate.Engine;

namespace WeiXinPF.Templates
{
    public class TemplateHandler : ITemplateHandler
    {
        protected TemplateHandler()
        {
        }

        public void Discover(TemplateDocument document, TemplateContext context)
        {
        }

        void ITemplateHandler.Building(BuildTemplateContext context)
        {
            Building(context);
        }

        void ITemplateHandler.Built(BuildTemplateContext context)
        {
            Built(context);
        }

        protected virtual void Building(BuildTemplateContext context) { }
        protected virtual void Built(BuildTemplateContext context) { }

        /// <summary>
        /// 生成模板
        /// </summary>
        /// <param name="context"></param>
        public virtual void BuildTemplate(BuildTemplateContext context) { }
    }
}
